<?php

class NewGuardUserForm extends PluginsfGuardUserForm
{
  public function configure()
  {
    unset(
      $this['id'],
      $this['algorithm'],
      $this['salt'],
      $this['is_active'],
      $this['is_super_admin'],
      $this['last_login'],
      $this['created_at'],
      $this['updated_at'],
      $this['groups_list'],
      $this['permissions_list'],
      $this['validation_key']
    );
    
    $this->setWidget('password', new sfWidgetFormInputPassword());
    
    $this->validatorSchema['email'] = new sfValidatorEmail(array('required' => true));
    $this->validatorSchema['username'] = new sfValidatorString(array('required' => true, 'min_length' => 6, 'max_length' => 127));
    $this->validatorSchema['password'] = new sfValidatorString(array('required' => true, 'min_length' => 6, 'max_length' => 127));
  }
}
